DEFINITION MODULE MenuIO; (* JPI TopSpeed Modula-2 V1.16 *)

 PROCEDURE Delay(n:CARDINAL);

 (* Delay pauses program a CARDINAL value of millisecs: 1000 = 1 sec. *)


 PROCEDURE EnvFind(name:ARRAY OF CHAR; VAR result:ARRAY OF CHAR);

 (* EnvFind finds a string in the DOS environment *)


 PROCEDURE Exec (command:ARRAY OF CHAR; params:ARRAY OF CHAR);

 (* Exec executes a named program, using all free heap memory to do so. *)
 (* All memory allocation/deallocation is automatic. Include ext & Path *)
 (* eg Exec('\COM\ED.EXE','AFILE'); will be passed as the 'command line'*)


 PROCEDURE ExecCmd(command:ARRAY OF CHAR);

 (* ExecCmd is similar to Exec except the command is executed under *)
 (* COMMAND.COM, the DOS command interpreter. This means that the   *)
 (* command can be exactly as typed from the normal DOS prompt, and *)
 (* may include 'built in' commands such as DIR, COPY etc.          *)
 (* Examples: ExecCmd('dir /w');   ( do a 'wide' DOS directory )    *)
 (*           ExecCmd('ed afile'); ( same as Exec example above )   *)
 (* ExecCmd is generally preferred over Exec for general use        *)
 (* although it has two disadvantages:                              *)
 (* 1) There is slightly less memory available to run the command,  *)
 (* 2) COMMAND.COM must be re-loaded which is slightly slower.      *)


 PROCEDURE GetKey(VAR sc:CHAR): CHAR;

 (* GetKey returns Char and scan code *)

 END MenuIO.